package com.google.code.timetrail.presenter;

import java.util.List;


import com.google.code.timetrail.backend.Control;
import com.google.code.timetrail.backend.Person;

public class InventoryFrameBackend {
    private Control gameControl;
    private List<Person> players;
    public InventoryFrameBackend(Control gameControl){
        this.gameControl = gameControl;
        players = this.gameControl.getMembers();
    }

    public String getTitle() {
        return "Inventory";
    }

    public String getMoneyLabel() {
        return "Money";
    }

    public String getHullPartsLabel() {
        return "Hull Parts";
    }

    public String getTimeBulletsLabel() {
        return "Time Bullets";
    }

    public String getTimeSuitsLabel() {
        return "Time Suits";
    }

    public String getEnginesLabel() {
        return "Engines";
    }

    public String getFCapacitorLabel() {
        return "Flux Capacitors";
    }

    public String getFoodLabel() {
        return "Food";
    }

    public String getFuelCellsLabel() {
        return "Fuel Cells";
    }

    public String getMoneyAmount() {
        return Integer.toString(gameControl.getInv().getMoney().getCurrentAmount());
    }

    public String getHullPartsAmount() {
        return Integer.toString(gameControl.getInv().getHullParts().getCurrentAmount());
    }

    public String getTimeBulletsAmount() {
        return Integer.toString(gameControl.getInv().getTimeBulletBills().getCurrentAmount());
    }

    public String getTimeSuitsAmount() {
        return Integer.toString(gameControl.getInv().getTimeSuits().getCurrentAmount());
    }

    public String getEnginesAmount() {
        return Integer.toString(gameControl.getInv().getEngines().getCurrentAmount());
    }

    public String getFCapacitorAmount() {
        return Integer.toString(gameControl.getInv().getFCapacitors().getCurrentAmount());
    }

    public String getFoodAmount() {
        return Integer.toString(gameControl.getInv().getFood().getCurrentAmount());
    }

    public String getFuelCellsAmount() {
        return Integer.toString(gameControl.getInv().getFuelCells().getCurrentAmount());
    }


    public String getPlayer(int playerNumber){
        if(players.size() >= playerNumber){
            return players.get(playerNumber-1).toString();
            } else {
                return "";
            }
    }
    public String getPlayerStatus(int playerNumber){
        if(players.size() >= playerNumber){
            return players.get(playerNumber-1).getStatus();
            } else {
                return "";
            }
    }
    public String getFirstPlayer() {
        return players.get(0).toString();
    }

    public String getFirstPlayerStatus() {
        
        return players.get(0).getStatus();
    }

    public String getSecondPlayer() {
        if(players.size() >= 2){
        return players.get(1).toString();
        } else {
            return players.get(1).getStatus();
        }
    }

    public String getSecondPlayerStatus() {
        return null;
    }

    public String getThirdPlayer() {
        return null;
    }

    public String getThirdPlayerStatus() {
        return null;
    }

    public String getFourthPlayer() {
        return null;
    }

    public String getFourthPlayerStatus() {
        return null;
    }

    public String getFifthPlayer() {
        return null;
    }

    public String getFifthPlayerStatus() {
        return null;
    }

    public String getBackButtonText() {
        return "<< Back";
    }

    public String getSaveButtonText() {
        return "Save";
    }

    public String getSkillsButtonText() {
        return "Skills";
    }

}
